//
//  MyInviteCell.m
//  MobileShoppingMall
//
//  Created by 冯传昌 on 2021/5/12.
//  Copyright © 2021 冯传昌. All rights reserved.
//

#import "MyInviteCell.h"

@interface MyInviteCell()

@property (nonatomic,strong) UILabel *invitePhoneLB;//邀请人手机号
@property (nonatomic,strong) UILabel *inviteTimeLB;//邀请人受邀时间

@property (nonatomic,strong) UIView *lineV;//分隔线

@end


@implementation MyInviteCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self initUI];
    }
    return self;
}
#pragma mark - setter
- (void)setModel:(UserInviteModel *)model{
    _model = model;
    self.invitePhoneLB.text = _model.telphone;
    self.inviteTimeLB.text = _model.time;
}
#pragma mark - UI
-(void)initUI{
    [self.contentView addSubview:self.invitePhoneLB];
    [self.contentView addSubview:self.inviteTimeLB];
    [self.contentView addSubview:self.lineV];
}
#pragma mark - lazy
- (UILabel *)invitePhoneLB{
    if (!_invitePhoneLB) {
        _invitePhoneLB = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, ScreenWidth/2, 22)];
        _invitePhoneLB.textAlignment = NSTextAlignmentLeft;
        _invitePhoneLB.font = FontSet(16);
        _invitePhoneLB.textColor = UIColor.blackColor;
    }
    return _invitePhoneLB;
}
- (UILabel *)inviteTimeLB{
    if (!_inviteTimeLB) {
        _inviteTimeLB = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth - 15 - (ScreenWidth/2-35), 17, ScreenWidth/2-35, 17)];
        _inviteTimeLB.textAlignment = NSTextAlignmentRight;
        _inviteTimeLB.font = FontSet(12);
        _inviteTimeLB.textColor = MainGrayTextColor;
    }
    return _inviteTimeLB;
}

- (UIView *)lineV{
    if (!_lineV) {
        _lineV = [[UIView alloc] initWithFrame:CGRectMake(15, 51, ScreenWidth-30, 1)];
        _lineV.backgroundColor = MainPureColor(246);
    }
    return _lineV;
}



@end
